import Cookies from "js-cookie";
const TokenKey = "access_token";
/**
 *
 * @param token
 */
export const setToken = (token: string) => {
  //有效时间（2小时）
  const expires = 1 / 12;
  Cookies.set(TokenKey, token, { expires });
};

export const getToken = () => {
  return Cookies.get(TokenKey);
};

export const removeToken = () => {
  return Cookies.remove(TokenKey);
};

